import pytest,requests
import allure
base_url = "http://121.40.86.4:8899"
@allure.story("夹具：登录")
@pytest.fixture(scope='function')
def login():
    response = requests.post(url = base_url+"/adminapi/login",json = {"account":"admin","pwd":"Aa010903!"})
    token = response.json()['data']['token']
    assert response.status_code == 200
    yield token # 返回token